<?

class WysiwygEdit extends Button {

    function render($sel) {
        $WYSIWYG_EDITABLE_EXTENSIONS = Config::getValue('limits','WYSIWYG_EDITABLE_EXTENSIONS');
        if ($sel->isFileSelected()) {
            $file = $sel->getSelected();
            if (in_array($file->getExt(),$WYSIWYG_EDITABLE_EXTENSIONS)) {
                return $this->renderPopupButton('wysiwygedit',"'dialogs/wysiwyg.php?path={$_GET['path']}&object={$_GET['object']}','editWind','status=no,resize=yes,menubar=no,height=500,width=700'",'Edit HTML','Edit in WYSIWYG mode');
            }
        }
        return $this->renderDisabledButton('wysiwygedit','Edit HTML','Edit in WYSIWYG mode');
    }

}

?>